/**
 * 
 */
package com.coders.vimek.Javatutorials;

import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import java.lang.Object;

/**
 * @author vimek
 *
 */
public class JavaDateUtilityExample {

	/**
	 * @param args
	 */

	public static void getDayofTheDate() {

		System.out.println("7. Get the day for a given date\n");
		Date d1 = new Date();
		String day = null;
		DateFormat f = new SimpleDateFormat("EEEE");
		try {
			day = f.format(d1);
		} catch (Exception e) {
			e.printStackTrace();
		}
		System.out.println("The day for " + d1 + " is " + day);
		System.out.println();
		System.out.println("-------------------------------------");
	}
	
	public static void main(String[] args) {
		// TODO Auto-generated method stub

		JavaDateUtilityExample obj = new JavaDateUtilityExample();
		obj.getDayofTheDate();
	
	}

}
